<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>06散点图</title>
    <!--    引入echarts依赖包-->
    <script src="https://cdn.jsdelivr.net/npm/echarts@5.4.3/dist/echarts.min.js"></script>
    <style>
        * {
            margin: 0;
            padding: 0;
        }

        .box {
            width: 100%;
            height: 400px;
            border: 1px solid #000;
        }
    </style>
</head>
<body>
<div class="box"></div>
</body>
</html>

<script>
    // 基于准备好的dom，初始化echarts实例
    let myChart = echarts.init(document.querySelector('.box'));

    // 指定图表的配置项和数据
    let option = {
        // 标题
        title: {
            text: '散点图',
        },
        xAxis: {
          // 类目轴  常用于离散的数据
          type: 'category',
        },
        yAxis: {},
        // 系列
        series: [
          {
            type: 'scatter',
            data: [[11, 10], [12, 20], [30, 3], [33, 40], [50, 50], [60, 60]]
          }
        ],



    };

    myChart.setOption(option)
</script>
